using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    [Serializable]
    public class TableUnit : TableRow, ICodeReplace
    {
#region 2013-1-4 19:16:52
public const string PLAYER_ID="PlayerId";
public const string KEY_UNIT_ID="UnitId";
public const string DOBJECT_ID="DObjectId";
public const string NAME="Name";
public const string NVALUE_DIC="NValueDic";
public const string EQUIP_DIC="EquipDic";
public const string ROW_STATE_TYPE="RowStateType";
public const string ROW_CREATE_TIME="RowCreateTime";
public const string ROW_DELETE_TIME="RowDeleteTime";
public const string BIG_TEXT_ROW_LOG="RowLog";

#endregion
public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _playerId = null;
        public string PlayerId
        {
            get
            {
                if (_playerId == null)
                {
                    _playerId = "";
                }
                return _playerId;
            }
            set { _playerId = value; }
        }

        private string _unitId = null;
        [OrmAttr(true)]
        public string UnitId
        {
            get
            {
                if (_unitId == null)
                {
                    _unitId = comm.GUID.NewString();
                }
                return _unitId;
            }
            set { _unitId = value; }
        }

        private string _dObjectId = null;
        public string DObjectId
        {
            get
            {
                if (_dObjectId == null)
                {
                    _dObjectId = "";
                }
                return _dObjectId;
            }
            set { _dObjectId = value; }
        }

        private string _name = null;
        public string Name
        {
            get
            {
                if (_name == null)
                {
                    _name = "";
                }
                return _name;
            }
            set { _name = value; }
        }

        private Dictionary<string, long> _nvalueDic = null;
        public Dictionary<string, long> NValueDic
        {
            get
            {
                if (_nvalueDic == null)
                {
                    _nvalueDic = new Dictionary<string, long>();
                }
                return _nvalueDic;
            }
            set { _nvalueDic = value; }
        }

        private Dictionary<ItemEquipType, string> _equipDic = null;
        public Dictionary<ItemEquipType, string> EquipDic
        {
            get
            {
                if (_equipDic == null)
                {
                    _equipDic = new Dictionary<ItemEquipType, string>();
                }
                return _equipDic;
            }
            set { _equipDic = value; }
        }
    }
}
